<template>
  <div>
    <!-- 有数据 -->
    <div class="list" v-if="arr.length > 0">
      <van-card
      v-for="item in arr"
      :key="item.id"
      :price="item.price|filterPrice"
      :title="item.goodsname"
      :thumb="$pre + item.img"
      @click="$router.push('/detail/' + item.id)"
    />
    </div>
    <!-- 无数据 -->
    <van-empty v-else description="暂无数据" />
    
  </div>
</template>

<script>
export default {
  props: ["arr"],
};
</script>

<style scoped>
.van-card{
  box-shadow: 0px 2px #ccc
}
</style>